<template>
  <div class="con">
    <div class="div">
      <el-breadcrumb separator-class="el-icon-arrow-right">
        <!-- :to="{ path: '/' }" -->
        <el-breadcrumb-item :to="{ path: '/home' }">首页</el-breadcrumb-item>
        <el-breadcrumb-item class="dangqian">支持与服务</el-breadcrumb-item>
      </el-breadcrumb>
      <div class="dil">
        <div class="left">
          <div class="one">支持与服务</div>
          <div v-for="(item,i) in list"
               :key="i"
               class="ul"
               :class="{sta:i==ind}"
               @click="sta(i)">{{item}} </div>
        </div>
        <div class="right"
             v-html="detail.content"></div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "",
  data() {
    return {
      list: ['关于我们', '买家入门', '卖家入门', '线下支付账号信息', '客服投诉'],
      ind: 0,
      html: '<p>123456</p>',
      detail:{}
    };
  },
  //注册组件
  components: {},
  //生命周期 - 创建完成（访问当前this实例）
  created() {
    this.isinput();
    if(this.$route.params.index){
      this.ind=parseInt(this.$route.params.index)
    }
    this.getdetail()
  },
  //生命周期 - 挂载完成（访问DOM元素）
  mounted() { },
  //计算属性
  computed: {},
  //方法
  methods: {
    getdetail(){
      this.$postRequest('/api/mallServer/getServers',{
        status: this.ind
      }).then(res=>{
        this.detail=res.data
      })
    },
    isinput() {
      this.$store.commit("setDValue", false);
    },
    sta(i) {
      if(this.ind!=i){
        this.ind = i
        this.getdetail()
      }
      
    }
  }
};
</script>
<style scoped lang="scss">
.con {
  background-color: #f9f9f9;
  .div {
    width: 1400px;
    margin: auto;
    /deep/ .el-breadcrumb {
      height: 48px;
      font-size: 14px;
      line-height: 48px;
      .el-breadcrumb__inner {
        color: #999;
        font-weight: 500;
      }
      .dangqian .el-breadcrumb__inner {
        color: #1a69e0;
      }
    }
    .dil {
      display: flex;
      align-items: flex-start;
      margin-bottom: 30px;
      .left {
        width: 250px;
        height: 850px;
        background: #ffffff;
        border: 1px solid #eeeeee;
        border-right: none;
        padding: 20px 20px 20px 50px;
        .one {
          font-size: 16px;
          font-family: Microsoft YaHei UI;
          font-weight: 400;
          color: #000000;
          margin-bottom: 48px;
        }
        .ul {
          font-size: 14px;
          font-family: Microsoft YaHei UI;
          font-weight: 400;
          color: #000000;
          margin-bottom: 16px;
          cursor: pointer;
          &.sta {
            color: #1a69e0;
          }
        }
      }
      .right {
        width: 1150px;
        background: #ffffff;
        min-height: 850px;
        border: 1px solid #eeeeee;
        padding: 40px;
      }
    }
  }
}
</style>